<template>
	<view>
		<view v-if="list.length">
			<view class="used-coupon" v-for="(item,index) in list" :key="index">
				<view class="coupon-title">
					<text>{{item.policyName}}</text>
					<text>面值:{{item.value}}元</text>
				</view>
				<view class="coupon-rule">
					<text>有效期至:{{item.useEndDate}}</text>
					<text>销售时间:{{item.saleTime}}</text>
				</view>

			</view>
		</view>
		<view class="no-data" v-else>
			<text>暂无优惠券</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['list'],
		data() {
			return {

			};
		},
		created() {

		}
	}
</script>

<style lang="scss">
	.no-data {
		width: 100vw;
		text-align: center;

		text {
			line-height: 140rpx;
			font-size: 26rpx;
			color: #999;
		}
	}

	.used-coupon {
		width: 90vw;
		padding: 20rpx;
		background-color: #fff;
		margin: 15rpx auto 0 auto;
		border-radius: 15rpx;
		color: #999;

		.coupon-title {
			display: flex;
			justify-content: space-between;
			font-size: 28rpx;
			border-bottom: 1px solid #f0f0f5;

			text {
				line-height: 60rpx;
			}
		}

		.coupon-rule {
			font-size: 28rpx;

			// border-bottom:1px solid #f0f0f5; 
			text {
				display: inline-block;
				line-height: 60rpx;
			}
		}
	}
</style>
